{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd \n",
    "pd.set_option('max_columns', 100)\n",
    "import numpy as np \n",
    "import matplotlib.pyplot as plt \n",
    "import seaborn as sns "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "train = pd.read_csv('happiness_train_abbr.csv')\n",
    "test = pd.read_csv('happiness_test_abbr.csv')\n",
    "IDtest = test['id']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 合并训练集和测试机"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "train = train[train.happiness != -8]\n",
    "train_len = len(train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Voyager\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: Sorting because non-concatenation axis is not aligned. A future version\n",
      "of pandas will change to not sort by default.\n",
      "\n",
      "To accept the future behavior, pass 'sort=True'.\n",
      "\n",
      "To retain the current behavior and silence the warning, pass sort=False\n",
      "\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>birth</th>\n",
       "      <th>car</th>\n",
       "      <th>city</th>\n",
       "      <th>class</th>\n",
       "      <th>county</th>\n",
       "      <th>depression</th>\n",
       "      <th>edu</th>\n",
       "      <th>equity</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>floor_area</th>\n",
       "      <th>gender</th>\n",
       "      <th>happiness</th>\n",
       "      <th>health</th>\n",
       "      <th>health_problem</th>\n",
       "      <th>height_cm</th>\n",
       "      <th>house</th>\n",
       "      <th>hukou</th>\n",
       "      <th>id</th>\n",
       "      <th>inc_ability</th>\n",
       "      <th>income</th>\n",
       "      <th>learn</th>\n",
       "      <th>marital</th>\n",
       "      <th>nationality</th>\n",
       "      <th>political</th>\n",
       "      <th>province</th>\n",
       "      <th>relax</th>\n",
       "      <th>religion</th>\n",
       "      <th>religion_freq</th>\n",
       "      <th>socialize</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>survey_time</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>view</th>\n",
       "      <th>weight_jin</th>\n",
       "      <th>work_exper</th>\n",
       "      <th>work_manage</th>\n",
       "      <th>work_status</th>\n",
       "      <th>work_type</th>\n",
       "      <th>work_yr</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1959</td>\n",
       "      <td>2</td>\n",
       "      <td>32</td>\n",
       "      <td>3</td>\n",
       "      <td>59</td>\n",
       "      <td>5</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>60000.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>45.0</td>\n",
       "      <td>1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>176</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>20000</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2015/8/4 14:18</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>155</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>30.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1992</td>\n",
       "      <td>2</td>\n",
       "      <td>52</td>\n",
       "      <td>6</td>\n",
       "      <td>85</td>\n",
       "      <td>3</td>\n",
       "      <td>12</td>\n",
       "      <td>3</td>\n",
       "      <td>40000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>110.0</td>\n",
       "      <td>1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>170</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>20000</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2015/7/21 15:04</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>110</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1967</td>\n",
       "      <td>2</td>\n",
       "      <td>83</td>\n",
       "      <td>5</td>\n",
       "      <td>126</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>8000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>120.0</td>\n",
       "      <td>2</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>160</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2000</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>29</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2015/7/21 13:24</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>122</td>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1943</td>\n",
       "      <td>1</td>\n",
       "      <td>28</td>\n",
       "      <td>5</td>\n",
       "      <td>51</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>78.0</td>\n",
       "      <td>2</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>163</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>6420</td>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2015/7/25 17:33</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>170</td>\n",
       "      <td>4</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1994</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>36</td>\n",
       "      <td>3</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>70.0</td>\n",
       "      <td>2</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>165</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>-8</td>\n",
       "      <td>-1</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2015/8/10 9:50</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>110</td>\n",
       "      <td>6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   birth  car  city  class  county  depression  edu  equity  family_income  \\\n",
       "0   1959    2    32      3      59           5   11       3        60000.0   \n",
       "1   1992    2    52      6      85           3   12       3        40000.0   \n",
       "2   1967    2    83      5     126           5    4       4         8000.0   \n",
       "3   1943    1    28      5      51           4    3       4        12000.0   \n",
       "4   1994    1    18      1      36           3   12       2           -2.0   \n",
       "\n",
       "   family_m  family_status  floor_area  gender  happiness  health  \\\n",
       "0         2              2        45.0       1        4.0       3   \n",
       "1         3              4       110.0       1        4.0       5   \n",
       "2         3              3       120.0       2        4.0       4   \n",
       "3         3              3        78.0       2        5.0       4   \n",
       "4         4              3        70.0       2        4.0       5   \n",
       "\n",
       "   health_problem  height_cm  house  hukou  id  inc_ability  income  learn  \\\n",
       "0               2        176      1      5   1            3   20000      3   \n",
       "1               4        170      1      1   2            2   20000      3   \n",
       "2               4        160      1      1   3            2    2000      2   \n",
       "3               4        163      1      1   4            2    6420      4   \n",
       "4               5        165      1      2   5           -8      -1      4   \n",
       "\n",
       "   marital  nationality  political  province  relax  religion  religion_freq  \\\n",
       "0        3            1          1        12      4         1              1   \n",
       "1        1            1          1        18      4         1              1   \n",
       "2        3            1          1        29      4         0              3   \n",
       "3        7            1          1        10      4         1              1   \n",
       "4        1            1          2         7      3         1              1   \n",
       "\n",
       "   socialize  status_3_before  status_peer      survey_time  survey_type  \\\n",
       "0          2                2            3   2015/8/4 14:18            1   \n",
       "1          2                1            1  2015/7/21 15:04            2   \n",
       "2          3                1            2  2015/7/21 13:24            2   \n",
       "3          2                1            2  2015/7/25 17:33            2   \n",
       "4          4                2            3   2015/8/10 9:50            1   \n",
       "\n",
       "   view  weight_jin  work_exper  work_manage  work_status  work_type  work_yr  \n",
       "0     4         155           1          2.0          3.0        1.0     30.0  \n",
       "1     4         110           1          3.0          3.0        1.0      2.0  \n",
       "2     4         122           2          NaN          NaN        NaN      NaN  \n",
       "3     3         170           4          NaN          NaN        NaN      NaN  \n",
       "4     3         110           6          NaN          NaN        NaN      NaN  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.concat(objs=[train,test], axis=0).reset_index(drop=True)\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 233,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(10956, 42)"
      ]
     },
     "execution_count": 233,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 234,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>birth</th>\n",
       "      <th>car</th>\n",
       "      <th>city</th>\n",
       "      <th>class</th>\n",
       "      <th>county</th>\n",
       "      <th>depression</th>\n",
       "      <th>edu</th>\n",
       "      <th>equity</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>floor_area</th>\n",
       "      <th>gender</th>\n",
       "      <th>happiness</th>\n",
       "      <th>health</th>\n",
       "      <th>health_problem</th>\n",
       "      <th>height_cm</th>\n",
       "      <th>house</th>\n",
       "      <th>hukou</th>\n",
       "      <th>id</th>\n",
       "      <th>inc_ability</th>\n",
       "      <th>income</th>\n",
       "      <th>learn</th>\n",
       "      <th>marital</th>\n",
       "      <th>nationality</th>\n",
       "      <th>political</th>\n",
       "      <th>province</th>\n",
       "      <th>relax</th>\n",
       "      <th>religion</th>\n",
       "      <th>religion_freq</th>\n",
       "      <th>socialize</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>view</th>\n",
       "      <th>weight_jin</th>\n",
       "      <th>work_exper</th>\n",
       "      <th>work_manage</th>\n",
       "      <th>work_status</th>\n",
       "      <th>work_type</th>\n",
       "      <th>work_yr</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095500e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>7988.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095600e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.00000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1964.598759</td>\n",
       "      <td>1.819642</td>\n",
       "      <td>42.680723</td>\n",
       "      <td>4.203359</td>\n",
       "      <td>70.807959</td>\n",
       "      <td>3.814074</td>\n",
       "      <td>4.859985</td>\n",
       "      <td>3.135360</td>\n",
       "      <td>6.636564e+04</td>\n",
       "      <td>2.881891</td>\n",
       "      <td>2.593830</td>\n",
       "      <td>116.023405</td>\n",
       "      <td>1.532129</td>\n",
       "      <td>3.867927</td>\n",
       "      <td>3.602227</td>\n",
       "      <td>3.796915</td>\n",
       "      <td>163.901789</td>\n",
       "      <td>1.069551</td>\n",
       "      <td>1.889376</td>\n",
       "      <td>5486.930267</td>\n",
       "      <td>1.097298</td>\n",
       "      <td>3.101968e+04</td>\n",
       "      <td>1.926250</td>\n",
       "      <td>3.242242</td>\n",
       "      <td>1.367652</td>\n",
       "      <td>1.325849</td>\n",
       "      <td>15.197882</td>\n",
       "      <td>3.299744</td>\n",
       "      <td>0.775739</td>\n",
       "      <td>1.429080</td>\n",
       "      <td>2.801752</td>\n",
       "      <td>1.708105</td>\n",
       "      <td>2.229372</td>\n",
       "      <td>1.41046</td>\n",
       "      <td>3.295089</td>\n",
       "      <td>121.370482</td>\n",
       "      <td>2.983936</td>\n",
       "      <td>2.643478</td>\n",
       "      <td>3.150845</td>\n",
       "      <td>0.912298</td>\n",
       "      <td>14.449056</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>16.901752</td>\n",
       "      <td>0.488070</td>\n",
       "      <td>27.174002</td>\n",
       "      <td>2.011036</td>\n",
       "      <td>38.675738</td>\n",
       "      <td>1.075696</td>\n",
       "      <td>3.163190</td>\n",
       "      <td>1.302817</td>\n",
       "      <td>2.837421e+05</td>\n",
       "      <td>1.504206</td>\n",
       "      <td>1.063074</td>\n",
       "      <td>90.915621</td>\n",
       "      <td>0.498989</td>\n",
       "      <td>0.818717</td>\n",
       "      <td>1.102775</td>\n",
       "      <td>1.331880</td>\n",
       "      <td>8.090070</td>\n",
       "      <td>1.199612</td>\n",
       "      <td>1.341876</td>\n",
       "      <td>3166.555394</td>\n",
       "      <td>3.407462</td>\n",
       "      <td>2.003299e+05</td>\n",
       "      <td>1.180954</td>\n",
       "      <td>1.432144</td>\n",
       "      <td>1.496111</td>\n",
       "      <td>1.101044</td>\n",
       "      <td>8.912911</td>\n",
       "      <td>1.059940</td>\n",
       "      <td>1.052262</td>\n",
       "      <td>1.414662</td>\n",
       "      <td>1.067310</td>\n",
       "      <td>0.928897</td>\n",
       "      <td>0.946134</td>\n",
       "      <td>0.49194</td>\n",
       "      <td>2.025916</td>\n",
       "      <td>23.150963</td>\n",
       "      <td>1.752436</td>\n",
       "      <td>1.748856</td>\n",
       "      <td>1.739672</td>\n",
       "      <td>1.392793</td>\n",
       "      <td>11.389993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1920.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>40.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1952.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>38.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.300000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>64.600000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>158.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2744.750000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.700000e+03</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1965.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>42.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.840000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>164.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5487.500000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.500000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>120.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>12.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>1977.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>104.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>7.000000e+04</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>170.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>8229.250000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.500000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1997.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>10.000000</td>\n",
       "      <td>134.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>14.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>9.999992e+06</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>2400.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>194.000000</td>\n",
       "      <td>96.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>10968.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.999990e+06</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>260.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>55.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              birth           car          city         class        county  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean    1964.598759      1.819642     42.680723      4.203359     70.807959   \n",
       "std       16.901752      0.488070     27.174002      2.011036     38.675738   \n",
       "min     1920.000000     -8.000000      1.000000     -8.000000      1.000000   \n",
       "25%     1952.000000      2.000000     18.000000      3.000000     38.000000   \n",
       "50%     1965.000000      2.000000     42.000000      5.000000     73.000000   \n",
       "75%     1977.000000      2.000000     65.000000      5.000000    104.000000   \n",
       "max     1997.000000      2.000000     89.000000     10.000000    134.000000   \n",
       "\n",
       "         depression           edu        equity  family_income      family_m  \\\n",
       "count  10956.000000  10956.000000  10956.000000   1.095500e+04  10956.000000   \n",
       "mean       3.814074      4.859985      3.135360   6.636564e+04      2.881891   \n",
       "std        1.075696      3.163190      1.302817   2.837421e+05      1.504206   \n",
       "min       -8.000000     -8.000000     -8.000000  -3.000000e+00     -3.000000   \n",
       "25%        3.000000      3.000000      2.000000   1.300000e+04      2.000000   \n",
       "50%        4.000000      4.000000      3.000000   3.840000e+04      3.000000   \n",
       "75%        5.000000      6.000000      4.000000   7.000000e+04      4.000000   \n",
       "max        5.000000     14.000000      5.000000   9.999992e+06     50.000000   \n",
       "\n",
       "       family_status    floor_area        gender    happiness        health  \\\n",
       "count   10956.000000  10956.000000  10956.000000  7988.000000  10956.000000   \n",
       "mean        2.593830    116.023405      1.532129     3.867927      3.602227   \n",
       "std         1.063074     90.915621      0.498989     0.818717      1.102775   \n",
       "min        -8.000000      0.000000      1.000000     1.000000     -8.000000   \n",
       "25%         2.000000     64.600000      1.000000     4.000000      3.000000   \n",
       "50%         3.000000     98.000000      2.000000     4.000000      4.000000   \n",
       "75%         3.000000    135.000000      2.000000     4.000000      4.000000   \n",
       "max         5.000000   2400.000000      2.000000     5.000000      5.000000   \n",
       "\n",
       "       health_problem     height_cm         house         hukou            id  \\\n",
       "count    10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean         3.796915    163.901789      1.069551      1.889376   5486.930267   \n",
       "std          1.331880      8.090070      1.199612      1.341876   3166.555394   \n",
       "min         -8.000000    100.000000     -3.000000      1.000000      1.000000   \n",
       "25%          3.000000    158.000000      1.000000      1.000000   2744.750000   \n",
       "50%          4.000000    164.000000      1.000000      1.000000   5487.500000   \n",
       "75%          5.000000    170.000000      1.000000      2.000000   8229.250000   \n",
       "max          5.000000    194.000000     96.000000      8.000000  10968.000000   \n",
       "\n",
       "        inc_ability        income         learn       marital   nationality  \\\n",
       "count  10956.000000  1.095600e+04  10956.000000  10956.000000  10956.000000   \n",
       "mean       1.097298  3.101968e+04      1.926250      3.242242      1.367652   \n",
       "std        3.407462  2.003299e+05      1.180954      1.432144      1.496111   \n",
       "min       -8.000000 -3.000000e+00     -8.000000      1.000000     -8.000000   \n",
       "25%        2.000000  1.700000e+03      1.000000      3.000000      1.000000   \n",
       "50%        2.000000  1.500000e+04      2.000000      3.000000      1.000000   \n",
       "75%        3.000000  3.500000e+04      3.000000      3.000000      1.000000   \n",
       "max        4.000000  9.999990e+06      5.000000      7.000000      8.000000   \n",
       "\n",
       "          political      province         relax      religion  religion_freq  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000   10956.000000   \n",
       "mean       1.325849     15.197882      3.299744      0.775739       1.429080   \n",
       "std        1.101044      8.912911      1.059940      1.052262       1.414662   \n",
       "min       -8.000000      1.000000     -8.000000     -8.000000      -8.000000   \n",
       "25%        1.000000      7.000000      3.000000      1.000000       1.000000   \n",
       "50%        1.000000     15.000000      3.000000      1.000000       1.000000   \n",
       "75%        1.000000     22.000000      4.000000      1.000000       1.000000   \n",
       "max        4.000000     31.000000      5.000000      1.000000       9.000000   \n",
       "\n",
       "          socialize  status_3_before   status_peer  survey_type          view  \\\n",
       "count  10956.000000     10956.000000  10956.000000  10956.00000  10956.000000   \n",
       "mean       2.801752         1.708105      2.229372      1.41046      3.295089   \n",
       "std        1.067310         0.928897      0.946134      0.49194      2.025916   \n",
       "min       -8.000000        -8.000000     -8.000000      1.00000     -8.000000   \n",
       "25%        2.000000         1.000000      2.000000      1.00000      3.000000   \n",
       "50%        3.000000         2.000000      2.000000      1.00000      4.000000   \n",
       "75%        4.000000         2.000000      3.000000      2.00000      4.000000   \n",
       "max        5.000000         3.000000      3.000000      2.00000      5.000000   \n",
       "\n",
       "         weight_jin    work_exper  work_manage  work_status    work_type  \\\n",
       "count  10956.000000  10956.000000  4025.000000  4024.000000  4025.000000   \n",
       "mean     121.370482      2.983936     2.643478     3.150845     0.912298   \n",
       "std       23.150963      1.752436     1.748856     1.739672     1.392793   \n",
       "min       40.000000      1.000000    -8.000000    -8.000000    -8.000000   \n",
       "25%      105.000000      1.000000     2.000000     3.000000     1.000000   \n",
       "50%      120.000000      3.000000     3.000000     3.000000     1.000000   \n",
       "75%      135.000000      5.000000     3.000000     3.000000     1.000000   \n",
       "max      260.000000      6.000000     4.000000     9.000000     2.000000   \n",
       "\n",
       "           work_yr  \n",
       "count  4024.000000  \n",
       "mean     14.449056  \n",
       "std      11.389993  \n",
       "min      -3.000000  \n",
       "25%       5.000000  \n",
       "50%      12.000000  \n",
       "75%      22.000000  \n",
       "max      55.000000  "
      ]
     },
     "execution_count": 234,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 235,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "birth                 0\n",
       "car                   0\n",
       "city                  0\n",
       "class                 0\n",
       "county                0\n",
       "depression            0\n",
       "edu                   0\n",
       "equity                0\n",
       "family_income         1\n",
       "family_m              0\n",
       "family_status         0\n",
       "floor_area            0\n",
       "gender                0\n",
       "happiness          2968\n",
       "health                0\n",
       "health_problem        0\n",
       "height_cm             0\n",
       "house                 0\n",
       "hukou                 0\n",
       "id                    0\n",
       "inc_ability           0\n",
       "income                0\n",
       "learn                 0\n",
       "marital               0\n",
       "nationality           0\n",
       "political             0\n",
       "province              0\n",
       "relax                 0\n",
       "religion              0\n",
       "religion_freq         0\n",
       "socialize             0\n",
       "status_3_before       0\n",
       "status_peer           0\n",
       "survey_time           0\n",
       "survey_type           0\n",
       "view                  0\n",
       "weight_jin            0\n",
       "work_exper            0\n",
       "work_manage        6931\n",
       "work_status        6932\n",
       "work_type          6931\n",
       "work_yr            6932\n",
       "dtype: int64"
      ]
     },
     "execution_count": 235,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 236,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>birth</th>\n",
       "      <th>car</th>\n",
       "      <th>city</th>\n",
       "      <th>class</th>\n",
       "      <th>county</th>\n",
       "      <th>depression</th>\n",
       "      <th>edu</th>\n",
       "      <th>equity</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>floor_area</th>\n",
       "      <th>gender</th>\n",
       "      <th>happiness</th>\n",
       "      <th>health</th>\n",
       "      <th>health_problem</th>\n",
       "      <th>height_cm</th>\n",
       "      <th>house</th>\n",
       "      <th>hukou</th>\n",
       "      <th>id</th>\n",
       "      <th>inc_ability</th>\n",
       "      <th>income</th>\n",
       "      <th>learn</th>\n",
       "      <th>marital</th>\n",
       "      <th>nationality</th>\n",
       "      <th>political</th>\n",
       "      <th>province</th>\n",
       "      <th>relax</th>\n",
       "      <th>religion</th>\n",
       "      <th>religion_freq</th>\n",
       "      <th>socialize</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>view</th>\n",
       "      <th>weight_jin</th>\n",
       "      <th>work_exper</th>\n",
       "      <th>work_manage</th>\n",
       "      <th>work_status</th>\n",
       "      <th>work_type</th>\n",
       "      <th>work_yr</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095500e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>7988.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095600e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.00000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1964.598759</td>\n",
       "      <td>1.819642</td>\n",
       "      <td>42.680723</td>\n",
       "      <td>4.203359</td>\n",
       "      <td>70.807959</td>\n",
       "      <td>3.814074</td>\n",
       "      <td>4.859985</td>\n",
       "      <td>3.135360</td>\n",
       "      <td>6.636564e+04</td>\n",
       "      <td>2.881891</td>\n",
       "      <td>2.593830</td>\n",
       "      <td>116.023405</td>\n",
       "      <td>1.532129</td>\n",
       "      <td>3.867927</td>\n",
       "      <td>3.602227</td>\n",
       "      <td>3.796915</td>\n",
       "      <td>163.901789</td>\n",
       "      <td>1.069551</td>\n",
       "      <td>1.889376</td>\n",
       "      <td>5486.930267</td>\n",
       "      <td>1.097298</td>\n",
       "      <td>3.101968e+04</td>\n",
       "      <td>1.926250</td>\n",
       "      <td>3.242242</td>\n",
       "      <td>1.367652</td>\n",
       "      <td>1.325849</td>\n",
       "      <td>15.197882</td>\n",
       "      <td>3.299744</td>\n",
       "      <td>0.775739</td>\n",
       "      <td>1.429080</td>\n",
       "      <td>2.801752</td>\n",
       "      <td>1.708105</td>\n",
       "      <td>2.229372</td>\n",
       "      <td>1.41046</td>\n",
       "      <td>3.295089</td>\n",
       "      <td>121.370482</td>\n",
       "      <td>2.983936</td>\n",
       "      <td>2.643478</td>\n",
       "      <td>3.150845</td>\n",
       "      <td>0.912298</td>\n",
       "      <td>14.449056</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>16.901752</td>\n",
       "      <td>0.488070</td>\n",
       "      <td>27.174002</td>\n",
       "      <td>2.011036</td>\n",
       "      <td>38.675738</td>\n",
       "      <td>1.075696</td>\n",
       "      <td>3.163190</td>\n",
       "      <td>1.302817</td>\n",
       "      <td>2.837421e+05</td>\n",
       "      <td>1.504206</td>\n",
       "      <td>1.063074</td>\n",
       "      <td>90.915621</td>\n",
       "      <td>0.498989</td>\n",
       "      <td>0.818717</td>\n",
       "      <td>1.102775</td>\n",
       "      <td>1.331880</td>\n",
       "      <td>8.090070</td>\n",
       "      <td>1.199612</td>\n",
       "      <td>1.341876</td>\n",
       "      <td>3166.555394</td>\n",
       "      <td>3.407462</td>\n",
       "      <td>2.003299e+05</td>\n",
       "      <td>1.180954</td>\n",
       "      <td>1.432144</td>\n",
       "      <td>1.496111</td>\n",
       "      <td>1.101044</td>\n",
       "      <td>8.912911</td>\n",
       "      <td>1.059940</td>\n",
       "      <td>1.052262</td>\n",
       "      <td>1.414662</td>\n",
       "      <td>1.067310</td>\n",
       "      <td>0.928897</td>\n",
       "      <td>0.946134</td>\n",
       "      <td>0.49194</td>\n",
       "      <td>2.025916</td>\n",
       "      <td>23.150963</td>\n",
       "      <td>1.752436</td>\n",
       "      <td>1.748856</td>\n",
       "      <td>1.739672</td>\n",
       "      <td>1.392793</td>\n",
       "      <td>11.389993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1920.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>40.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1952.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>38.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.300000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>64.600000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>158.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2744.750000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.700000e+03</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1965.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>42.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.840000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>164.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5487.500000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.500000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>120.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>12.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>1977.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>104.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>7.000000e+04</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>170.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>8229.250000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.500000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1997.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>10.000000</td>\n",
       "      <td>134.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>14.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>9.999992e+06</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>2400.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>194.000000</td>\n",
       "      <td>96.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>10968.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.999990e+06</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>260.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>55.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              birth           car          city         class        county  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean    1964.598759      1.819642     42.680723      4.203359     70.807959   \n",
       "std       16.901752      0.488070     27.174002      2.011036     38.675738   \n",
       "min     1920.000000     -8.000000      1.000000     -8.000000      1.000000   \n",
       "25%     1952.000000      2.000000     18.000000      3.000000     38.000000   \n",
       "50%     1965.000000      2.000000     42.000000      5.000000     73.000000   \n",
       "75%     1977.000000      2.000000     65.000000      5.000000    104.000000   \n",
       "max     1997.000000      2.000000     89.000000     10.000000    134.000000   \n",
       "\n",
       "         depression           edu        equity  family_income      family_m  \\\n",
       "count  10956.000000  10956.000000  10956.000000   1.095500e+04  10956.000000   \n",
       "mean       3.814074      4.859985      3.135360   6.636564e+04      2.881891   \n",
       "std        1.075696      3.163190      1.302817   2.837421e+05      1.504206   \n",
       "min       -8.000000     -8.000000     -8.000000  -3.000000e+00     -3.000000   \n",
       "25%        3.000000      3.000000      2.000000   1.300000e+04      2.000000   \n",
       "50%        4.000000      4.000000      3.000000   3.840000e+04      3.000000   \n",
       "75%        5.000000      6.000000      4.000000   7.000000e+04      4.000000   \n",
       "max        5.000000     14.000000      5.000000   9.999992e+06     50.000000   \n",
       "\n",
       "       family_status    floor_area        gender    happiness        health  \\\n",
       "count   10956.000000  10956.000000  10956.000000  7988.000000  10956.000000   \n",
       "mean        2.593830    116.023405      1.532129     3.867927      3.602227   \n",
       "std         1.063074     90.915621      0.498989     0.818717      1.102775   \n",
       "min        -8.000000      0.000000      1.000000     1.000000     -8.000000   \n",
       "25%         2.000000     64.600000      1.000000     4.000000      3.000000   \n",
       "50%         3.000000     98.000000      2.000000     4.000000      4.000000   \n",
       "75%         3.000000    135.000000      2.000000     4.000000      4.000000   \n",
       "max         5.000000   2400.000000      2.000000     5.000000      5.000000   \n",
       "\n",
       "       health_problem     height_cm         house         hukou            id  \\\n",
       "count    10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean         3.796915    163.901789      1.069551      1.889376   5486.930267   \n",
       "std          1.331880      8.090070      1.199612      1.341876   3166.555394   \n",
       "min         -8.000000    100.000000     -3.000000      1.000000      1.000000   \n",
       "25%          3.000000    158.000000      1.000000      1.000000   2744.750000   \n",
       "50%          4.000000    164.000000      1.000000      1.000000   5487.500000   \n",
       "75%          5.000000    170.000000      1.000000      2.000000   8229.250000   \n",
       "max          5.000000    194.000000     96.000000      8.000000  10968.000000   \n",
       "\n",
       "        inc_ability        income         learn       marital   nationality  \\\n",
       "count  10956.000000  1.095600e+04  10956.000000  10956.000000  10956.000000   \n",
       "mean       1.097298  3.101968e+04      1.926250      3.242242      1.367652   \n",
       "std        3.407462  2.003299e+05      1.180954      1.432144      1.496111   \n",
       "min       -8.000000 -3.000000e+00     -8.000000      1.000000     -8.000000   \n",
       "25%        2.000000  1.700000e+03      1.000000      3.000000      1.000000   \n",
       "50%        2.000000  1.500000e+04      2.000000      3.000000      1.000000   \n",
       "75%        3.000000  3.500000e+04      3.000000      3.000000      1.000000   \n",
       "max        4.000000  9.999990e+06      5.000000      7.000000      8.000000   \n",
       "\n",
       "          political      province         relax      religion  religion_freq  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000   10956.000000   \n",
       "mean       1.325849     15.197882      3.299744      0.775739       1.429080   \n",
       "std        1.101044      8.912911      1.059940      1.052262       1.414662   \n",
       "min       -8.000000      1.000000     -8.000000     -8.000000      -8.000000   \n",
       "25%        1.000000      7.000000      3.000000      1.000000       1.000000   \n",
       "50%        1.000000     15.000000      3.000000      1.000000       1.000000   \n",
       "75%        1.000000     22.000000      4.000000      1.000000       1.000000   \n",
       "max        4.000000     31.000000      5.000000      1.000000       9.000000   \n",
       "\n",
       "          socialize  status_3_before   status_peer  survey_type          view  \\\n",
       "count  10956.000000     10956.000000  10956.000000  10956.00000  10956.000000   \n",
       "mean       2.801752         1.708105      2.229372      1.41046      3.295089   \n",
       "std        1.067310         0.928897      0.946134      0.49194      2.025916   \n",
       "min       -8.000000        -8.000000     -8.000000      1.00000     -8.000000   \n",
       "25%        2.000000         1.000000      2.000000      1.00000      3.000000   \n",
       "50%        3.000000         2.000000      2.000000      1.00000      4.000000   \n",
       "75%        4.000000         2.000000      3.000000      2.00000      4.000000   \n",
       "max        5.000000         3.000000      3.000000      2.00000      5.000000   \n",
       "\n",
       "         weight_jin    work_exper  work_manage  work_status    work_type  \\\n",
       "count  10956.000000  10956.000000  4025.000000  4024.000000  4025.000000   \n",
       "mean     121.370482      2.983936     2.643478     3.150845     0.912298   \n",
       "std       23.150963      1.752436     1.748856     1.739672     1.392793   \n",
       "min       40.000000      1.000000    -8.000000    -8.000000    -8.000000   \n",
       "25%      105.000000      1.000000     2.000000     3.000000     1.000000   \n",
       "50%      120.000000      3.000000     3.000000     3.000000     1.000000   \n",
       "75%      135.000000      5.000000     3.000000     3.000000     1.000000   \n",
       "max      260.000000      6.000000     4.000000     9.000000     2.000000   \n",
       "\n",
       "           work_yr  \n",
       "count  4024.000000  \n",
       "mean     14.449056  \n",
       "std      11.389993  \n",
       "min      -3.000000  \n",
       "25%       5.000000  \n",
       "50%      12.000000  \n",
       "75%      22.000000  \n",
       "max      55.000000  "
      ]
     },
     "execution_count": 236,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 237,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 2]\n",
      "1    6459\n",
      "2    4497\n",
      "Name: survey_type, dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2142a4fd8d0>"
      ]
     },
     "execution_count": 237,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEKCAYAAAD0Luk/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/A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AaYBrwXLFUBhsHwFsU98OpEqYh9/KJL29D8XiRx332pm/wSsNbMaYrM3zgF+ZmbfA/YCfx1s/hiw0szWEwuPT+PYxULgBTPb4+6jEt8DkcTRLaIiIhGmy0EiIhGmEBARiTCFgIhIhCkEREQiTCEgIhJhCgERkQhTCIiIRJhCQEQkwv4fjzAQTgSWBPoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print(df.survey_type.unique())\n",
    "print(df.survey_type.value_counts())\n",
    "sns.countplot(y='survey_type', hue='happiness', data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 238,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2142a510c50>"
      ]
     },
     "execution_count": 238,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEKCAYAAAAIO8L1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGa1JREFUeJzt3X3YXHV54PHvLREVFAiSxJgEo22ksK4iZrnwtQpeRdASQKKwvkTFplVUsGsrrruCa7ur1RalWmwW1IBWwCAlIgrZKFrXAiYSwktQooskEpOovKhciuC9f5zfY4aH38ycJ3Ce5yH5fq5rrjnnN/ecueecmXPP77xNZCaSJI32qIlOQJI0OVkgJElVFghJUpUFQpJUZYGQJFVZICRJVRYISVKVBUKSVGWBkCRVTZnoBB6KffbZJ+fOnTvRaUjSI8rq1at/mpnThsU9ogvE3LlzWbVq1USnIUmPKBHxozZxbmKSJFVZICRJVRYISVKVBUKSVGWBkCRVdVogImKviFgWETdHxLqIeG5E7B0RKyLilnI/t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/+FHz5Faao5j6Tbs6/wdNuzb/B0y/Ov8HxFfnP33WNTTriGvKPP0C247G6hf/jrKs7qMpXmePZZ3qmdSSpKqdehOTJKk/C4QkqcoCIUmqskBIkqosEJKkKguE1KFyCZQDJjoPaXt4mKvUUkTskpn3T3Qe0nixByHRXEAtIm6OiKXlwnvLylnkt0bE+yLiW8DCiDgwIq4qMRdHxNSI2D8irhk1rbVl+MqImF+Gf1kuQnddmcaM0j6jTOu6cnteaX9tRFwTEWsi4p8jYpcJmDXaiVkgpG32A5Zk5jNp/lDpraX915n5gsw8HzgXeHeJuR44LZsLFe4aEU8r8a+muW7/aLvTXBL9WTSXeP6z0n4m8I3SfhBwY0TsX6bz/GwuwHY/zZVNpXFjgZC22ZCZ/7cMf5bm8gjQ/HMXEbEnzZ8yfaO0L6X5Tw5oCsKryvCrR54zyr3ApWV4Nc2F86C5Zs9Z8Psrct5Fc+2r5wDfKZdwPozmMgvSuJky0QlIk8joHXIj479q8dwLgC9ExBdp/qildpG83+a2nX73M/j7F8DSzBz2fw5SZ+xBSNvsGxHPLcMnAN/qfbD8sr8jIl5Yml5H8895ZOYPaFb6/51672GQlTT/IzDypy97lLbjeq72uXdEPGXsb0nafhYIaZt1wKKyg3lvymafURbR/GPYWpqr6f6PnscuAF5Lff/DICcDL4mI62k2Pf2HzLyJ5vLPV5TXWkHzfxnSuPEwV4nf/w3kpZn50P+FS9pB2IOQJFXZg5AkVdmDkCRVWSAkSVUWCElSlQVCklRlgZAkVVkgJElV/x+21XoXj/LX4gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='province', data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 239,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       " 1    10085\n",
       " 8      378\n",
       " 4      216\n",
       " 6      136\n",
       " 3       90\n",
       " 2       24\n",
       "-8       20\n",
       " 5        6\n",
       " 7        1\n",
       "Name: nationality, dtype: int64"
      ]
     },
     "execution_count": 239,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAYAAACHjumMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEXtJREFUeJzt3XuQXnV9x/H3NwkxEAIo7ICKGI0URbRAU6rGAQQvsSClXqpUaKVanI5YqAItKhRsbRVb6yiOLRVNVMRBLqMiorRyKdCCCWBDCDiAXCUmKRMIFIHAt3+cs3aDm+xJ8nx3n2fzfs3sPJec53y/yWY/+zuX3zmRmUhShSkT3YCkycuAkVTGgJFUxoCRVMaAkVTGgJFUxoCRVMaAkVTGgJFUZtpENzDS/Pnz89JLL53oNiSNLbos1FcjmFWrVk10C5J6qK8CRtLkYsBIKmPASCpjwEgqY8BIKmPASCpjwEgqY8BIKtNXZ/Ju6U466SSWL1/OLrvswhlnnDHR7UibzYDpI8uXL+f++++f6DaknnETSVIZA0ZSGQNGUhkDRlIZA0ZSGQNGUhkDRlIZA0ZSGQNGUhkDRlIZA0ZSGQNGUhkDRlIZA0ZSGQNGUhkDRlIZLzg1TuZ9ft6Yy0xfPZ0pTOHe1feOufw1H7ymV61JZQY6YLzEZH/z+6OBDhgvMblpxusH3++PBjpgtGn8wdd4Kd/JGxFTI+LGiLi4upak/jIeR5GOA5aNQx1JfaZ0EykidgUOAT4BfKiylrZs7lDuT9X7YD4LnATMWt8CEXEMcAzAbrvtVtyOJqtB2a902mmnDcQ6e6VsEykiDgVWZObiDS2XmWdl5tzMnDs0NFTVjqQJULkPZh5wWETcBXwTOCgivl5YT1KfKdtEysyTgZMBIuJA4ITMPLKqnsbXmR/+7pjLrF716K8euyx/7D++ZbP7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L/OzLN7XYfmN/5RwJJ2hAbwkcy8pMd1ngssbC8INgU4LzPLDiGPg52Bi5qfD6YB38jMS4tqfRA4p918uROoOjViG+ANwPsr1j8sM6+LiPOBG2gOkNxIj6cNOFVAUpmB2kSSNFgMGEllDBhJZQwYSWUMGEllDBh1FhGHj7y3VUR8PCJe3+MaBw7PvI6Iw4Zv2PfM2hoMBow2xuE0N9EDIDNPzcx/qyqWmd/JzE+OVluDwYDZgkXE7Pa6Jv/aXhPkhxGxdUT8aUT8uL1mzAXtmZ6voZkb8+l2usaciFgQzf2viIiD20mAS9pr6Dyrff+uiDg9Im5o/+yl7fv7RcS17WeuHXGG7Mj+3hMRZ66n9g0jlts9IsZjzpM2kgGj3YEvZObLgdXA22jmeP12Zv4mzanj783Ma2nuCnFiO13jjuEVtBcpWgC8MzNfQXNG7Z+NqLGqnYz4ReCE9r1bgf3biYOnAn+3vgbXU/uhiNi7XeTotr76jAGjn2Xm8NSExcBsYK+I+I92Gsa7gZePsY492vX8tH29kObaKcOGJ24Orx9ge+Bb0Vwp8J861HimLwFHt1Me3klzUSv1GQNGj494/hTN6GMBcGw7GjkdGOsyiqPdxXO0GsPrh2Yu2eWZuRfwlg41nukCmhnHhwKLM/N/NvLzGgcGjEYzC3igvXzEu0e8v6b9s2e6FZgdES9pXx8FXDlGje2B+9vn7+nQ0zq1M/OXNPfc+iLwlQ6f1wQwYDSaU2iupncZ617K4ZvAie2O2TnDb7Y/7EfTbPIsobmC3T+PUeMM4O8j4hqaa8+OZbTa59Beza7D5zUBnE2tgRURJwDbZ+YpE92LRjfI14PRFiwiLgLmAAdNdC9aP0cwksq4D0ZSGQNGUhkDRlIZA0ZSGQNGUpn/A7vAmx+2vpZfAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 288x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.factorplot(x='nationality', y='happiness', data=df, kind='bar')\n",
    "df.nationality.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 240,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['income'] = df['income'].map(lambda i: np.log(i) if i>1 else 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 241,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2142a6acb70>"
      ]
     },
     "execution_count": 241,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8XNWV4PHfKW2lfZdsLbblBW8Y22CbAAHChMUkYZkEGpj0NEnTIYSQTnpLk0k3pOmmJyQzmSEJ3QnT0ISEDhCSDk5jmiQsSQibjS0vsg2W5UWybEvWvpWkqrrzR70nl8slqyTV/s7389FHVfXeqzoul46uzjv3PjHGoJRSyhlciQ5AKaVU/GjSV0opB9Gkr5RSDqJJXymlHESTvlJKOYgmfaWUchBN+kop5SCa9JVSykE06SullINkJjqAUBUVFWbBggWJDkMppVLKu+++e9IYUznVfkmX9BcsWMDWrVsTHYZSSqUUETkcyX5a3lFKKQfRpK+UUg6iSV8ppRwk6Wr6Sik1Pj5OW1sbHo8n0aEkHbfbTV1dHVlZWTM6XpO+UirptLW1UVhYyIIFCxCRRIeTNIwxdHV10dbWRkNDw4yeQ8s7Sqmk4/F4KC8v14QfQkQoLy+f1V9AmvSVUklJE354s31fNOkrlcKMMeglT9V0aNJXKkUZY/jsD9/l7qe2aeKPgYsvvjjRIcSEnshVKkVt3nWcX+45AcCv9pzg6pVzEhxRennjjTcSHUJM6EhfqRTkGffxj5v3smxOIUuqCnhw815Gvb5Eh5VWCg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eS+B2zj7KH/G76XTk/50lphATl9iIm5EJItAwn/KGPOz0O3GmH5jzKB1ezOQJSIV8YzReu1263sH8O8E/lwOFtGyHHFwLbDNGHMidEOyvJeWE3b5y/oebsW+pHhPrRPIHwM+aayic6gIPh8xY4w5YYzxGWP8wP+b5LWT5b3MBD4OPDPZPrN5L52e9GezxERcWLW9x4C9xphvTbLPHPs8g4hsIPD/2hWvGK3XzReRQvs2gZN7u0N22wT8kdXF8wGgzy5fxNmko6hkeC+DBH/2bgeeD7PPS8DVIlJqlSyuth6LGwlcZOmvgeuNMWGvERrh5yOWMQafO/qvk7x2JPkgHq4E9hlj2sJtnPV7Gasz06nyRaCj5H0CZ+2/aj32AIEPMICbQBmgmcC6QQvjHN8HCfyJuRNotL4+AtwF3GXtcw/QRKDb4C3g4gS8jwut199hxWK/l8FxCvCI9V7vAtYlIM48Akm8OOixhL+XBH4JHQPGCYw47yBw7uhlYL/1vczadx2BK9jZx/6x9flsBj6dgDibCdTC7c+n3e1WA2w+2+cjjjH+0PrM7SSQyOeGxmjdPyMfxDNO6/En7M9j0L5Rey91Rq5SSjmI08s7SinlKJr0lVLKQTTpK6WUg2jSV0opB9Gkr5RSDqJJXymlHESTvlJKOYgmfaWUcpD/D4rOzKvrbLb1AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.kdeplot(df.income)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 242,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.work_status.unique()\n",
    "df.work_status.fillna(0, inplace=True)\n",
    "df.work_type.fillna(0, inplace=True)\n",
    "df.work_yr.fillna(0, inplace=True)\n",
    "df.work_manage.fillna(0, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['family_income'] = df['family_income'].map(lambda i: np.log(i) if i > 1 else 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 244,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['family_m'] = df['family_m'].map(lambda i: np.log(i) if i> 1 else 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 245,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Voyager\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([ 1,  3,  2,  0, 10, 30,  4,  5,  6,  7,  8, 14, 11, 96, 12],\n",
       "      dtype=int64)"
      ]
     },
     "execution_count": 245,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['house'][df.house<=0] = 0\n",
    "df.house.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 246,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Voyager\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([2, 1, 0], dtype=int64)"
      ]
     },
     "execution_count": 246,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['car'][df['car']<0] = 0 \n",
    "df['car'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 247,
   "metadata": {},
   "outputs": [],
   "source": [
    "# plt.figure(figsize=(40, 40))\n",
    "# g = sns.heatmap(df.corr(), annot=True, fmt='.2f')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 248,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x21428d2ca20>"
      ]
     },
     "execution_count": 248,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 1440x1440 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAYAAACHjumMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAE09JREFUeJzt3XuwXXV5xvHvQy6GhEQuOYAQEEVFKXWAZqgIgyBaIpcgF6cyYDXKpNPBAWoVRdDRqe201KGW6lhTUCgiLQVSFJVLqYHSqhggQEJAEUFICDmUQjgol4S3f6x16Dk5t7X2Pu++neczs2ftvfb+rd+bk3Wes9ZvXbYiAjOzDNu0uwAz610OGDNL44AxszQOGDNL44AxszQOGDNL44AxszQOGDNL44AxszTT213AUIsWLYobbrih3WWY2cRU5UMdtQXz1FNPtbsEM5tEHRUwZtZbHDBmlsYBY2ZpHDBmlsYBY2ZpHDBmlsYBY2ZpHDBmlqajzuQ1s/Y755xz2LBhA7vuuisXXHBBU8tywJjZMBs2bGDdunWTsizvIplZGgeMmaVxwJhZGo/BVDCZg15mrdAp66wDpoLJHPQya4VOWWe9i2RmaRwwZpbGAWNmaRwwZpbGg7xmo2j3UZiq/W/48kOjzt/yvy+/Ot36M7t+8k2TV+gEHDBmo2j3UZh29z9ZvItkZmkcMGaWJn0XSdI0YCWwLiKOze7PhmvnWEKzfbd7HKQZdWq/++KNI+a9uGnLq9Ot3z/g9J0nr9BkrRiDOQtYC8xrQV9N+/GykRn4wrMvl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pFvohh/WQ2cVqPtlRT78C+XP6iP1Wh7KMUYxr0Uu2irgKNrtH87cHfZfjXw+SZ+BodT8ygSxTjKPeVjDXBezfb7AyvL+v8N2KFm+9nA/wCvbfDf/EWKX4zVwOXAa2q0/U+KQLwHOLKR9QTYCbiFYuvnFmDHmu1PKJ+/CDwJ3Fiz/UPAY0PWvVGPBI3R9pry53Yv8D1g90Z/R2jiSKQvFTCzNB27i2Rm3c8BY2ZpHDBmlsYBY2ZpHDBmlsYBY6kkfUTSV9tdh7WHA8bM0jhgrCmSTivvebNK0jfKizuXSPq5pFspLncY/OylKr4va/D1wKgLtZ7hgLGGSXob8IcUF1TuD2wBTqM4A/cQ4L0UXxtsU1TmF69Z7zsS+D3gZ8XlQmxLcUHiiojoB5D0L8Bb2lahtZW3YKwZAi6L8qLUiNgH+AJj36BoM+U6V17AOLMlVVrbOGCsGbcAJw+5cnlHios7Dy9v9jQD+MCQzz9CscUDxb1eZrSwVmsD7yJZwyLifknnU9wxbxuKq3HPoNiK+THFFbp3UdyTF+Afgesk3UERTs+3vGhrKV9NbWZpvItkZmkcMGaWxgFjZmkcMGaWxgFjZmkcMGaWxgFjZmn+Dx+tYyAbhRvMAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 288x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(20,20))\n",
    "sns.factorplot(x='edu', y='happiness', data=df, kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 249,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x21425d97cf8>"
      ]
     },
     "execution_count": 249,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUEAAAEYCAYAAADCj0QOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcm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LwJnS1qZvM4td1F2KF8iY2a55pGgmeWaQ9DMcs0haGa55hA0s1xzCJpZrjkErUeRtEDSReWuw/LDIWi9WjJBl1mn+T8g6zRJNwGXUJw7ehvFx0U9CPwAKABvAf89ItZJWgC8AVQDw4HrI2JxcmfF7cDZwEu0mIZV0iRgLjAo2f9lEbFZ0iPAf1C8ILkW+F7mP6z1WQ5B6xRJ1cDnKD4dpT/wNMUQnA/8VUS8KOnjwP+mGHAAI4AzgBMphtdi4C+ADwEnAcOANcDdyX23twNTI6JR0nTgfwKXJ/s6NiLOzPwHtT7PIWiddQbws4h4G0DSEmAg8CfA/y0O8AA4okWfhyKiGVgjaViy7k+BH0fEfuBVSb9O1n8ImAgsS/bVD9jcYl+Luv5HsjxyCFpnqcS6CmBHRJzSRp89bfQvde+mgNURcXob+3qz4xLNOuYTI9ZZjwHnSxqYPDPvPIrfAb4kaRoUn6Qi6aMd7OdRYIakfskj6T+VrH8eKEg6PdlXpaSPZPKTWK45BK1TIuIpit/rPQM8ANQBOymeKLlC0jPAamBqB7t6EHgReBb4IfDbZP97gYuAbyf7WknxUNusS/kpMtZpkgZFxG5JR1Ic0c06MK+GWW/h7wTtvZgvaQLFEyILHYDWG3kkaGa55u8EzSzXHIJmlmsOQTPLNYegmeWaQ9DMcu3/A468OHXu3zeZAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 330.375x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.factorplot(x='gender', y='happiness', hue='car', data=df, kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x2142a672a20>"
      ]
     },
     "execution_count": 250,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABaYAAAEYCAYAAACnaCGEAAAABHNCSVQICAgIfAhkiAA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5J8JsnlSd6W5Kwk25N8KclPdvdfVtW5ST6fZGeSb0vy89395qqqJL+V5IlJPpGk5l7/kUleleSew+s/p7tvrqr3JvlgkscmuTDJK0f/ZYFJyRdgTDIGGIt8AcYiX5iaYpp1q6p2JvmXSR6e2bH60cxC8ewkz+/uG6rqUUl+J7PAS5IjknxPku/ILMzenOSHkzw4ycOS3C/JtUnOqarDMgvLk7p7T1X9aJKXJ/nx4bXu3d2PH/0XBSYnX4AxyRhgLPIFGIt8YRkU06xn35PkHd39f5Okqt6Z5B5JvjvJH80+hEuS3H3uOW/v7n9Icm1V3W9Ye1ySN3b3V5PcVFX/Y1h/cJKHJrl4eK1Dk9w891p/uPhfCVgn5AswJhkDjEW+AGORL0xOMc16VqusHZLkb7v7uH0858v7eH7v4/Wv6e7H7OO1/u7AIwIblHwBxiRjgLHIF2As8oXJ+fJD1rMPJPmhqrpHVd0zyQ9mdj2jT1TV05OkZr7rAK/z/iTPqKpDq+qIJN83rF+fZHtVPWZ4rcOq6iGj/CbAeiNfgDHJGGAs8gUYi3xhcopp1q3uvjSzaxR9LMlbk1yW5HOZXYj/eVX1sSTXJDnpAC/1tiQ3JLkqyWuTvG94/a8kOSXJrw+vdUVm/0QF2OTkCzAmGQOMRb4AY5EvLEN1r3Z2PawPVXXP7v5iVX1jZp+6nd7dH132XMDGJ1+AMckYYCzyBRiLfGFqrjHNend2VR2b2QX3zxOIwALJF2BMMgYYi3wBxiJfmJQzpgEAAAAAmJRrTAMAAAAAMCnFNAAAAAAAk1JMAwAAAAAwKcU0AAAAAACTUkwDAAAAADCp/w+1dpMFoEU9BAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1440x288 with 5 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.factorplot(x='gender', col='happiness', data=df, kind='count')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.drop('survey_time', axis=1, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 建模"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Voyager\\Anaconda3\\lib\\site-packages\\pandas\\core\\frame.py:3694: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  errors=errors)\n"
     ]
    }
   ],
   "source": [
    "train = df[:train_len]\n",
    "test = df[train_len:]\n",
    "test.drop('happiness', axis=1, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "metadata": {},
   "outputs": [],
   "source": [
    "Y_train = train['happiness'] \n",
    "X_train = train.drop('happiness', axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 257,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 10 folds for each of 6 candidates, totalling 60 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done  46 tasks      | elapsed:  3.2min\n",
      "[Parallel(n_jobs=-1)]: Done  60 out of  60 | elapsed:  4.8min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',\n",
       "            max_depth=None, max_features=0.33, max_leaf_nodes=None,\n",
       "            min_impurity_decrease=0.0, min_impurity_split=None,\n",
       "            min_samples_leaf=1, min_samples_split=2,\n",
       "            min_weight_fraction_leaf=0.0, n_estimators=300, n_jobs=1,\n",
       "            oob_score=False, random_state=None, verbose=0,\n",
       "            warm_start=False)"
      ]
     },
     "execution_count": 257,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.ensemble import RandomForestClassifier\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "\n",
    "kfold = StratifiedKFold(n_splits=10)\n",
    "rf = RandomForestClassifier()\n",
    "rf_params = {\n",
    "    'max_features': ['auto', 'sqrt', 0.33],\n",
    "    'n_estimators':[100,300]\n",
    "}\n",
    "gsrf = GridSearchCV(rf, param_grid=rf_params, cv=kfold, scoring='accuracy', n_jobs=-1, verbose=1)\n",
    "gsrf.fit(X_train, Y_train)\n",
    "gsrf.best_estimator_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 258,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6235603405107661"
      ]
     },
     "execution_count": 258,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gsrf.best_score_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_happiness = pd.Series(gsrf.predict(test), name='happiness')\n",
    "results = pd.concat([IDtest, test_happiness], axis=1)\n",
    "results.to_csv('0828_submission.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 268,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>happiness</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>8001</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>8002</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8003</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>8004</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>8005</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>8006</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>8007</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8008</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8009</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>8010</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>8011</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>8012</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>8013</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>8014</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>8015</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>8016</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>8017</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>8018</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>8019</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>8020</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>8021</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>8022</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>8023</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>8024</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>8025</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>8026</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>8027</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>8028</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>8029</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>8030</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2938</th>\n",
       "      <td>10939</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2939</th>\n",
       "      <td>10940</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2940</th>\n",
       "      <td>10941</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2941</th>\n",
       "      <td>10942</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2942</th>\n",
       "      <td>10943</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2943</th>\n",
       "      <td>10944</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2944</th>\n",
       "      <td>10945</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2945</th>\n",
       "      <td>10946</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2946</th>\n",
       "      <td>10947</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2947</th>\n",
       "      <td>10948</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2948</th>\n",
       "      <td>10949</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2949</th>\n",
       "      <td>10950</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2950</th>\n",
       "      <td>10951</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2951</th>\n",
       "      <td>10952</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2952</th>\n",
       "      <td>10953</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2953</th>\n",
       "      <td>10954</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2954</th>\n",
       "      <td>10955</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2955</th>\n",
       "      <td>10956</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2956</th>\n",
       "      <td>10957</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2957</th>\n",
       "      <td>10958</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2958</th>\n",
       "      <td>10959</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2959</th>\n",
       "      <td>10960</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2960</th>\n",
       "      <td>10961</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2961</th>\n",
       "      <td>10962</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2962</th>\n",
       "      <td>10963</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2963</th>\n",
       "      <td>10964</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2964</th>\n",
       "      <td>10965</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2965</th>\n",
       "      <td>10966</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2966</th>\n",
       "      <td>10967</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2967</th>\n",
       "      <td>10968</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2968 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         id  happiness\n",
       "0      8001        4.0\n",
       "1      8002        2.0\n",
       "2      8003        3.0\n",
       "3      8004        4.0\n",
       "4      8005        4.0\n",
       "5      8006        4.0\n",
       "6      8007        4.0\n",
       "7      8008        5.0\n",
       "8      8009        4.0\n",
       "9      8010        4.0\n",
       "10     8011        3.0\n",
       "11     8012        4.0\n",
       "12     8013        4.0\n",
       "13     8014        4.0\n",
       "14     8015        4.0\n",
       "15     8016        4.0\n",
       "16     8017        4.0\n",
       "17     8018        4.0\n",
       "18     8019        4.0\n",
       "19     8020        4.0\n",
       "20     8021        4.0\n",
       "21     8022        4.0\n",
       "22     8023        4.0\n",
       "23     8024        4.0\n",
       "24     8025        4.0\n",
       "25     8026        4.0\n",
       "26     8027        4.0\n",
       "27     8028        4.0\n",
       "28     8029        4.0\n",
       "29     8030        4.0\n",
       "...     ...        ...\n",
       "2938  10939        5.0\n",
       "2939  10940        4.0\n",
       "2940  10941        4.0\n",
       "2941  10942        4.0\n",
       "2942  10943        4.0\n",
       "2943  10944        3.0\n",
       "2944  10945        4.0\n",
       "2945  10946        4.0\n",
       "2946  10947        4.0\n",
       "2947  10948        4.0\n",
       "2948  10949        4.0\n",
       "2949  10950        4.0\n",
       "2950  10951        4.0\n",
       "2951  10952        4.0\n",
       "2952  10953        4.0\n",
       "2953  10954        4.0\n",
       "2954  10955        4.0\n",
       "2955  10956        4.0\n",
       "2956  10957        4.0\n",
       "2957  10958        4.0\n",
       "2958  10959        4.0\n",
       "2959  10960        4.0\n",
       "2960  10961        4.0\n",
       "2961  10962        4.0\n",
       "2962  10963        4.0\n",
       "2963  10964        5.0\n",
       "2964  10965        4.0\n",
       "2965  10966        4.0\n",
       "2966  10967        4.0\n",
       "2967  10968        5.0\n",
       "\n",
       "[2968 rows x 2 columns]"
      ]
     },
     "execution_count": 268,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([IDtest, test_happiness], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
